package quant.smart.crawl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableScheduling;

import quant.smart.crawl.cmd.ClientFactory;
import quant.smart.crawl.utils.Constants;

@SpringBootApplication
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class} )
@EnableScheduling
public class SmartCrawlApplication implements CommandLineRunner{
	@Autowired
	ClientFactory clientFactory;
	
	public static void main(String[] args) {
		SpringApplication.run(SmartCrawlApplication.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		System.out.println("server run...");
		clientFactory.register(Constants.OPT_LME_COLLECT);
	}
}
